public class TemplateMethodPattern {
    public static void main(String[] args) {
        TestPaper testPaper=new Answer();
        testPaper.question();
    }
}
abstract class TestPaper{
    void question(){
        System.out.println(
            "1+1="+answer()
        );
    }
    abstract String answer();
}
class Answer extends TestPaper{

    @Override
    String answer() {
     return "2";
    }

}
